﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GruntyOS.IO;
namespace GDOS
{
    class GLNFS
    {
        public static bool isGLNFS(char drive)
        {
            DeviceStream dev = new DeviceStream(Kernel.FileSystem.GetDeviceHandle(drive.ToString()));
            dev.Position = 512; // the GLNFS magic number is on LBA 2, so go there!
            BinaryReader br = new BinaryReader(dev);
            if (br.ReadString() == "GFS SC") // Valid GLNFS Partition
            {
                return true;
            }
            else
                return false;
        }
    }
}
